{% extends "base.html" %}

{% block title3 %}
active
{% endblock %}

{% block page-body %}

    <h1 class="page-header">数据修改</h1>

    <!--面板 开始-->
    <div class="panel panel-primary">
        <div class="panel-heading">主机用户密码</div>
        <div class="panel-body">
            <form class="form-inline" action="/edit_userinfo/?user_id={{ user_obj.id }}" method="post">
{#                <input name="user_id" style="display: none" value="{{ user_obj.id }}">#}
                <div class="form-group ">
                    <label for="ip">IP</label>
                    <input name="ip" type="text" class="form-control" id="ip" value="{{ user_obj.ip }}">
                </div>
                <div class="form-group ">
                    <label for="user">账户</label>
                    <input name="user" type="text" class="form-control" id="user" value="{{ user_obj.user }}">
                </div>
                <div class="form-group">
                    <label for="password">密码</label>
                    <input name="password" type="text" class="form-control" id="password"
                           value="{{ user_obj.password }}">
                </div>

                <div class="form-group">
                    <label for="rootpwd">root密码</label>
                    <input name="rootpwd" type="text" class="form-control" id="rootpwd"
                           value="{{ user_obj.root_password }}">
                </div>

                <div class="form-group"><strong>批量管理</strong>
                    <select name="management" class="form-control">
                        {% if user_obj.management == "可以" %}
                            <option selected value="可以">YES</option>
                            <option value="不可以">NO</option>
                            <option value="">未知</option>

                        {% elif user_obj.management == "不可以" %}
                            <option value="可以">YES</option>
                            <option selected value="不可以">NO</option>
                            <option value="">未知</option>
                        {% else %}
                            <option value="可以">YES</option>
                            <option value="不可以">NO</option>
                            <option selected value="">未知</option>
                        {% endif %}
                    </select>
                </div>
                <button type="submit" class="btn btn-success ">提交</button>
            </form>
        </div>
        <!--面板body 结束-->
    </div>
{% endblock %}
